function degreeDirect(degree) { //设置方向
	var d;
	var remain = degree % 45;
	switch (parseInt(degree / 45)) {
		case 0:
			if (remain == 0) d = "正北";
			else d = "北偏东" + degree + "&deg;";
			break;
		case 1:
			if (remain == 0) d = "东北";
			else d = "东偏北" + (90 - degree) + "&deg;";
			break;
		case 2:
			if (remain == 0) d = "正东";
			else d = "东偏南" + (degree - 90) + "&deg;";
			break;
		case 3:
			if (remain == 0) d = "东南";
			else d = "南偏东" + (180 - degree) + "&deg;";
			break;
		case 4:
			if (remain == 0) d = "正南";
			else d = "南偏西" + (degree - 180) + "&deg;";
			break;
		case 5:
			if (remain == 0) d = "西南";
			else d = "西偏南" + (270 - degree) + "&deg;";
			break;
		case 6:
			if (remain == 0) d = "正西";
			else d = "西偏北" + (degree - 270) + "&deg;";
			break;
		case 7:
			if (remain == 0) d = "西北";
			else d = "北偏西" + (360 - degree) + "&deg;";
			break;
		default:
			d = "正北";
			break;
	}
	return d;
}
//获取CheckBox的选中值
function GetCheckBoxValue(nameClass) {
	var value1 = document.getElementsByName(nameClass);
	var value2 = "";
	for (var i = 0; i < value1.length; i++) {
		if (value1[i].checked) {
			value2 += value1[i].value + ',';
		}
	}
	value2 = value2.substr(0, value2.length - 1);
	return value2;
}
//获取Radio的选中值
function GetRadioValue(nameClass) {
	var value1 = document.getElementsByName(nameClass);
	var value2 = "";
	for (var i = 0; i < value1.length; i++) {
		if (value1[i].checked) {
			value2 += value1[i].value;
		}
	}
	return value2;
}

//获取Radio的选中值
function SetRadioValue(nameClass, v) {
	var value1 = document.getElementsByName(nameClass);
	for (var i = 0; i < value1.length; i++) {
		if (value1[i].value == v) {
			value1[i].checked = true;
		}
	}
}

function addDate(date, days) {
	var d = new Date(date);
	d.setDate(d.getDate() + days);
	var month = d.getMonth() + 1;
	var day = d.getDate();
	if (month < 10) {
		month = month;
	}
	if (day < 10) {
		day = day;
	}
	var val = d.getFullYear() + "-" + month + "-" + day;
	return val;
}